VIP_END_TIME = 60 * 60 * 24 * 365

ROUTE_CODE_MAP = {
    2000: "成功",
    2004: "文件名字重复",

    4000: "请求类型错误",
    4003: "角色权限不正确",
    4005: "请求方法错误",
    4007: "手机验证码",
    4008: "图形验证码错误",

    3002: "地址重定向",

}

LOGIN_APP_MAP = {
    'weibo': {"client_id": '3674019597',
              "client_secret": "7ae99bc0d54ead29fc8d1b9fabd78587",
              "redirect_uri": 'http://127.0.0.1:8000/user/weiboCallback/',
              "grant_type": "authorization_code"},
    'github': {
        'client_secret': '17f3c97a314befb869c1d121da4dab7541d17545',
        'client_id': '96fc0810a20e268e8c6e',
        'redirect_uri': 'http://127.0.0.1:8000/callback/github',
        'app_name': 'shuaige',
    },
    'gitee': {
        'client_secret': 'd66b8d72bd7d7efe71460327b2a2b171184933ffe325171daf8d21b81bd0e879',
        'client_id': '755e9140481a1e1fbd4a5653183478afa8c91903a6120919cafe0a051c55ae23',
        'redirect_uri': 'http://127.0.0.1:8000/callback/gitee',
        'grant_type': 'authorization_code',
    },
}

LOGIN_APP_URL = {
    'weibo': {
        'warrant': "https://api.weibo.com/oauth2/authorize?"
    },
    'github': {
        'warrant': "https://github.com/login/oauth/authorize?",
        'access_token': 'https://github.com/login/oauth/access_token?',
        'user_info': 'https://api.github.com/user'
    },
    'gitee': {
        'warrant': "https://gitee.com/oauth/authorize?response_type=code&",
        'access_token': 'https://gitee.com/oauth/token?',
        'user_info': 'https://gitee.com/api/v5/user'
    },
}

LIMIT = 5
OFFSET = 0

CAR_KEY = 'car_'
